package petrochina.company.electric.model;

import android.os.Parcel;
import android.os.Parcelable;

public class TaskPowerResult implements Parcelable {

    // 1606 线
    private int taskLine;

    // 号 #
    private int taskNumber;

    // 任务名
    private String taskName;

    // 任务类型
    private int taskType;

    // 时间
    private String dateTime;

    //步骤数
    private int stepNumber;

    //状态 0, 1, 2
    private int taskStatus;

    public int getTaskLine() {
        return taskLine;
    }

    public void setTaskLine(int taskLine) {
        this.taskLine = taskLine;
    }

    public int getTaskNumber() {
        return taskNumber;
    }

    public void setTaskNumber(int taskNumber) {
        this.taskNumber = taskNumber;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public int getTaskType() {
        return taskType;
    }

    public void setTaskType(int taskType) {
        this.taskType = taskType;
    }

    public String getDateTime() {
        return dateTime;
    }

    public void setDateTime(String dateTime) {
        this.dateTime = dateTime;
    }

    public int getStepNumber() {
        return stepNumber;
    }

    public void setStepNumber(int stepNumber) {
        this.stepNumber = stepNumber;
    }

    public int getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(int taskStatus) {
        this.taskStatus = taskStatus;
    }

    @Override
    public String toString() {
        return "TaskResult{" +
                "taskLine=" + taskLine +
                ", taskNumber=" + taskNumber +
                ", taskName='" + taskName + '\'' +
                ", taskType=" + taskType +
                ", dateTime='" + dateTime + '\'' +
                ", stepNumber=" + stepNumber +
                ", taskStatus=" + taskStatus +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.taskLine);
        dest.writeInt(this.taskNumber);
        dest.writeString(this.taskName);
        dest.writeInt(this.taskType);
        dest.writeString(this.dateTime);
        dest.writeInt(this.stepNumber);
        dest.writeInt(this.taskStatus);
    }

    public void readFromParcel(Parcel source) {
        this.taskLine = source.readInt();
        this.taskNumber = source.readInt();
        this.taskName = source.readString();
        this.taskType = source.readInt();
        this.dateTime = source.readString();
        this.stepNumber = source.readInt();
        this.taskStatus = source.readInt();
    }

    public TaskPowerResult() {
    }

    protected TaskPowerResult(Parcel in) {
        this.taskLine = in.readInt();
        this.taskNumber = in.readInt();
        this.taskName = in.readString();
        this.taskType = in.readInt();
        this.dateTime = in.readString();
        this.stepNumber = in.readInt();
        this.taskStatus = in.readInt();
    }

    public static final Creator<TaskPowerResult> CREATOR = new Creator<TaskPowerResult>() {
        @Override
        public TaskPowerResult createFromParcel(Parcel source) {
            return new TaskPowerResult(source);
        }

        @Override
        public TaskPowerResult[] newArray(int size) {
            return new TaskPowerResult[size];
        }
    };
}
